package com.mark.beetl.service.impl;

import com.mark.beetl.dao.UserDao;
import com.mark.beetl.entity.User;
import com.mark.beetl.service.UserService;
import org.beetl.sql.core.SQLManager;
import org.beetl.sql.core.annotatoin.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author maliqiang
 * @version 1.0
 * @create 2017-03-30
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;
    @Autowired
    SQLManager sql;
    public void save(User user) {
        userDao.insert(user);
    }

    public User queryById(Integer id) {
        return userDao.queryById(id);
    }

    public User queryByCondition(User user) {
        return null;
    }

    @Override
    public List<User> queryAll() {
        return userDao.queryAll();
    }

    public void deleteById(User user) {
        userDao.deleteById(user);
    }
}
